package com;

import org.apache.ibatis.session.SqlSessionFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.liu.po.UserInfo;
import com.liu.service.UserInfoService;

public class test {

	public static void main(String[] args) {
		ApplicationContext applicationContext = new ClassPathXmlApplicationContext("beans.xml");
		UserInfoService UserInfoService = (UserInfoService) applicationContext.getBean("userInfoServiceImpl");
		System.out.println(UserInfoService);
		UserInfo userInfo = new UserInfo();
		userInfo.setUserName("王五");
		userInfo.setUserSex("男 ");
		boolean addUser = UserInfoService.addUser(userInfo);
		System.out.println(addUser);
	}
}
